import sheep from '@/sheep';
import { formatImageUrlProtocol } from './index';

const Invite_colleagues = (poster) => {
    const width = poster.width;
    const userInfo = sheep.$store('user').userInfo;

    return {
        background: formatImageUrlProtocol(sheep.$url.cdn(sheep.$store('app').platform.share.posterInfo.labor_dispatchingk_bg)),
        list: [
        {
            name: 'goodsTitle',
            type: 'text',
            val: poster.shareInfo.poster.title,
            x: width * 0.3,
            y: width * 0.45,
            maxWidth: width * 0.91,
            line: 2,
            lineHeight: 5,
            paintbrushProps: {
            fillStyle: '#FF4A3E',
            font: {
                fontSize: 16,
            },
            },
        },
        // #ifndef MP-WEIXIN
        {
            name: 'qrcode',
            type: 'qrcode',
            val: poster.shareInfo.link,
            x: width * 0.35,
            y: width * 0.43,
            size: width * 1,
        },
        // #endif
        // #ifdef MP-WEIXIN
        {
            name: 'wxacode',
            type: 'image',
            val: sheep.$api.third.wechat.getWxacode(poster.shareInfo.path),
            x: width * 0.24,
            y: width * 0.52,
            width: width * 0.5,
            height: width * 0.5,
        },
        // #endif
        ],
    };
};

export default Invite_colleagues;
